#pragma once
#include "Headers.h"

namespace particleEditorCli
{
	using namespace System;
	using namespace System::Collections::Generic;
	using namespace System::Text;
	using namespace System::Globalization;
	using namespace System::ComponentModel;

	ref class VectorConverter;
	[TypeConverterAttribute(VectorConverter::typeid)]
	[Browsable(true),RefreshProperties(RefreshProperties::All), EditorBrowsable(EditorBrowsableState::Advanced)]
	ref class Vector2dProperties
	{
	public:
		float x,y;
		[DescriptionAttribute("X component"),RefreshProperties(RefreshProperties::All), NotifyParentProperty(true)]
		property float X
		{
			float get();
			void set(float value);
		}
		[Browsable(true),RefreshProperties(RefreshProperties::All), NotifyParentProperty(true), EditorBrowsable(EditorBrowsableState::Advanced)]
		property float Y
		{
			float get();
			void set(float value);
		}
	};

	[TypeConverterAttribute(VectorConverter::typeid)]
	[Browsable(true),RefreshProperties(RefreshProperties::All), EditorBrowsable(EditorBrowsableState::Advanced)]
	ref class Vector3dProperties: public Vector2dProperties
	{
	public:
		float z;
		[Browsable(true),RefreshProperties(RefreshProperties::All), NotifyParentProperty(true), EditorBrowsable(EditorBrowsableState::Advanced)]
		property float Z
		{
			float get();
			void set(float value);
		}
	};

	[TypeConverterAttribute(VectorConverter::typeid)]
	[Browsable(true),RefreshProperties(RefreshProperties::All), EditorBrowsable(EditorBrowsableState::Advanced)]
	ref class Vector4dProperties: public Vector3dProperties
	{
	public:
		float w;
		[Browsable(true),RefreshProperties(RefreshProperties::All), NotifyParentProperty(true), EditorBrowsable(EditorBrowsableState::Advanced)]
		property float W
		{
			float get();
			void set(float value);
		}
	};

	[TypeConverterAttribute(ExpandableObjectConverter::typeid)]
	ref class VectorConverter : ExpandableObjectConverter
	{
	public:
		virtual bool CanConvertTo(ITypeDescriptorContext^ context, System::Type^ destinationType) override;
		virtual Object^ ConvertTo(ITypeDescriptorContext^ context, CultureInfo^ culture, Object^ value, System::Type^ destinationType) override;
		virtual bool CanConvertFrom(ITypeDescriptorContext^ context, System::Type^ sourceType)override;
		virtual Object^ ConvertFrom(ITypeDescriptorContext^ context, CultureInfo^ culture, System::Object^ value)override;
	};
}